<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-CN">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />



  <meta name="google-site-verification" content="6Ik8pGDtBtOTGCKiPW_YXR0Wqp7FfhOllj0Bi92eBDo" />







  <meta name="baidu-site-verification" content="code-uIla4FKPmw" />







  
  
  <link href="/berlinblog/libs/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/berlinblog/libs/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/berlinblog/css/main.css?v=5.1.2" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Java,k8s,云原生," />





  <link rel="alternate" href="/berlinblog/atom.xml" title="白叁木小肆" type="application/atom+xml" />




  <link rel="shortcut icon" type="image/x-icon" href="https://raw.githubusercontent.com/A-limon/pacman/master/source/img/favicon.ico?v=5.1.2" />






<meta name="description" content="Install nginx打开nginx官网，下载nginx的tar包 接着安装nginx所需的依赖: 1$ yum -y install gcc pcre-devel zlib-devel openssl openssl-devel  Install12345671. 解压    tar -zxvf nginx-1.21.3.tar.gz2. 进入nginx    cd nginx-1.21.3">
<meta property="og:type" content="article">
<meta property="og:title" content="Kubernetes">
<meta property="og:url" content="https://berlinwong.gitee.io/berlinblog/2021/10/28/%E4%BA%91%E5%8E%9F%E7%94%9F/index.html">
<meta property="og:site_name" content="白叁木小肆">
<meta property="og:description" content="Install nginx打开nginx官网，下载nginx的tar包 接着安装nginx所需的依赖: 1$ yum -y install gcc pcre-devel zlib-devel openssl openssl-devel  Install12345671. 解压    tar -zxvf nginx-1.21.3.tar.gz2. 进入nginx    cd nginx-1.21.3">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211027182605993.png">
<meta property="og:image" content="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211027184353268.png">
<meta property="og:image" content="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211027214831585.png">
<meta property="og:image" content="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211027215100845.png">
<meta property="og:image" content="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211028005006115.png">
<meta property="og:image" content="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211028014028266.png">
<meta property="og:image" content="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211028014116677.png">
<meta property="og:image" content="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211028014313285.png">
<meta property="og:image" content="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211028014428144.png">
<meta property="og:image" content="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211028014654487.png">
<meta property="og:image" content="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211028014728873.png">
<meta property="og:image" content="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211028025040556.png">
<meta property="article:published_time" content="2021-10-27T18:59:25.000Z">
<meta property="article:modified_time" content="2021-10-27T19:10:29.693Z">
<meta property="article:author" content="Berlin">
<meta property="article:tag" content="Java">
<meta property="article:tag" content="k8s">
<meta property="article:tag" content="云原生">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211027182605993.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '',
    scheme: 'Gemini',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":12,"b2t":true,"scrollpercent":true,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://berlinwong.gitee.io/berlinblog/2021/10/28/云原生/"/>





  <title>Kubernetes | 白叁木小肆</title>
  














<meta name="generator" content="Hexo 5.4.0"></head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta custom-logo">
    

    <div class="custom-logo-site-title">
      <a href="/berlinblog/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">白叁木小肆</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">当一个快乐的码农吧！</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/berlinblog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/berlinblog/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            Tags
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/berlinblog/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            Categories
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/berlinblog/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            Archives
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/berlinblog/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            About
          </a>
        </li>
      
        
        <li class="menu-item menu-item-sitemap">
          <a href="/berlinblog/sitemap.xml" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-sitemap"></i> <br />
            
            Sitemap
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://berlinwong.gitee.io/berlinblog/berlinblog/2021/10/28/%E4%BA%91%E5%8E%9F%E7%94%9F/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/berlinblog/images/avatar.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="白叁木小肆">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Kubernetes</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2021-10-28T02:59:25+08:00">
                2021-10-28
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">In</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/berlinblog/categories/%E4%BB%A3%E7%A0%81%E5%AE%9E%E6%88%98/" itemprop="url" rel="index">
                    <span itemprop="name">代码实战</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          


          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="Install-nginx"><a href="#Install-nginx" class="headerlink" title="Install nginx"></a>Install nginx</h2><p><a target="_blank" rel="noopener" href="http://nginx.org/en/download.html">打开nginx官网</a>，下载nginx的tar包</p>
<p>接着<strong>安装</strong>nginx所需的<strong>依赖</strong>:</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> yum -y install gcc pcre-devel zlib-devel openssl openssl-devel</span></span><br></pre></td></tr></table></figure>

<h3 id="Install"><a href="#Install" class="headerlink" title="Install"></a>Install</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">1. 解压</span><br><span class="line">    tar -zxvf nginx-1.21.3.tar.gz</span><br><span class="line">2. 进入nginx</span><br><span class="line">    cd nginx-1.21.3</span><br><span class="line">3. 配置</span><br><span class="line">    ./configure --prefix=/usr/local/nginx-1.21.3</span><br><span class="line">4. make &amp;&amp; make install</span><br></pre></td></tr></table></figure>

<span id="more"></span>

<h3 id="Command-Start-amp-Stop"><a href="#Command-Start-amp-Stop" class="headerlink" title="Command Start &amp; Stop"></a>Command Start &amp; Stop</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> ./sbin/nginx</span></span><br><span class="line"><span class="meta">$</span><span class="bash"> ./sbin/nginx -s reload</span></span><br><span class="line"><span class="meta">$</span><span class="bash"> ./sbin/nginx -s stop</span></span><br></pre></td></tr></table></figure>

<hr>
<p><em><strong>踩坑记录:</strong></em></p>
<p><strong>VMware虚拟机中的CentOS7安装Nginx后本机无法访问的解决办法</strong></p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> firewall-cmd --zone=public --add-port=80/tcp --permanent</span>  </span><br></pre></td></tr></table></figure>

<p>命令含义：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">–zone             #作用域</span><br><span class="line"></span><br><span class="line">–add-port=80/tcp  #添加端口，格式为：端口/通讯协议</span><br><span class="line"></span><br><span class="line">–permanent        #永久生效，没有此参数重启后失效</span><br></pre></td></tr></table></figure>

<p>重启防火墙：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> systemctl stop firewalld.service</span>  </span><br><span class="line"><span class="meta">$</span><span class="bash"> systemctl start firewalld.service</span>  </span><br></pre></td></tr></table></figure>

<hr>
<p>接着主机访问虚拟机地址就可以显示下面的界面:</p>
<p><img src="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211027182605993.png" alt="image-20211027182605993"></p>
<p>到此nginx算是安装完成了</p>
<h2 id="Tips-for-Chapter-one"><a href="#Tips-for-Chapter-one" class="headerlink" title="Tips for Chapter one"></a>Tips for Chapter one</h2><h3 id="Edit-PATH"><a href="#Edit-PATH" class="headerlink" title="Edit PATH"></a>Edit PATH</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> vim /etc/profile          <span class="comment">#vi编辑</span></span></span><br><span class="line"></span><br><span class="line">PATH=$ PATH:/usr/local/nginx/sbin</span><br><span class="line">export PATH</span><br><span class="line"><span class="meta"></span></span><br><span class="line"><span class="meta">$</span><span class="bash"> <span class="built_in">source</span> /etc/profile       <span class="comment">#重启生效</span></span></span><br></pre></td></tr></table></figure>

<h3 id="Enable-Nginx-nginx-service"><a href="#Enable-Nginx-nginx-service" class="headerlink" title="Enable Nginx nginx.service"></a>Enable Nginx nginx.service</h3><p>centos 7以上是用Systemd进行系统初始化的，Systemd 是 Linux 系统中最新的初始化系统（init），它主要的设计目标是克服 sysvinit 固有的缺点，提高系统的启动速度。</p>
<p>Systemd服务文件以.service结尾，比如现在要建立nginx为开机启动，如果用yum install命令安装的，yum命令会自动创建nginx.service文件，直接用命令：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> systemctl <span class="built_in">enable</span> nginx.service</span></span><br></pre></td></tr></table></figure>

<p>在这里我是用源码编译安装的，所以要手动创建nginx.service服务文件。<br>开机没有登陆情况下就能运行的程序，存在系统服务（system）里，即：<code>/lib/systemd/system/</code></p>
<p>在系统服务目录里创建<code>nginx.service</code>文件</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> vi /lib/systemd/system/nginx.service</span></span><br></pre></td></tr></table></figure>

<p><code>nginx.service</code>内容如下：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">[Unit]</span><br><span class="line">Description=nginx</span><br><span class="line">After=network.target</span><br><span class="line"></span><br><span class="line">[Service]</span><br><span class="line">Type=forking</span><br><span class="line">ExecStart=/usr/local/nginx/sbin/nginx</span><br><span class="line">ExecReload=/usr/local/nginx/sbin/nginx -s reload</span><br><span class="line">ExecStop=/usr/local/nginx/sbin/nginx -s quit</span><br><span class="line">PrivateTmp=true</span><br><span class="line"></span><br><span class="line">[Install]</span><br><span class="line">WantedBy=multi-user.target</span><br></pre></td></tr></table></figure>

<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"> 注释</span></span><br><span class="line">Description:描述服务</span><br><span class="line">After:描述服务类别</span><br><span class="line">[Service]服务运行参数的设置</span><br><span class="line">Type=forking是后台运行的形式</span><br><span class="line">ExecStart为服务的具体运行命令</span><br><span class="line">ExecReload为重启命令</span><br><span class="line">ExecStop为停止命令</span><br><span class="line">PrivateTmp=True表示给服务分配独立的临时空间</span><br><span class="line">注意：[Service]的启动、重启、停止命令全部要求使用绝对路径</span><br><span class="line">[Install]运行级别下服务安装的相关设置，可设置为多用户，即系统运行级别为3</span><br></pre></td></tr></table></figure>

<p>设置开机启动</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> systemctl <span class="built_in">enable</span> nginx.service</span></span><br></pre></td></tr></table></figure>

<p>自此，重新centos后，nginx就自动启动了</p>
<h3 id="Command-For-Nginx"><a href="#Command-For-Nginx" class="headerlink" title="Command For Nginx"></a>Command For Nginx</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> systemctl start nginx.service　（启动nginx服务）</span></span><br><span class="line"><span class="meta">$</span><span class="bash"> systemctl stop nginx.service　（停止nginx服务）</span></span><br><span class="line"><span class="meta">$</span><span class="bash"> systemctl <span class="built_in">enable</span> nginx.service （设置开机自启动）</span></span><br><span class="line"><span class="meta">$</span><span class="bash"> systemctl <span class="built_in">disable</span> nginx.service （停止开机自启动）</span></span><br><span class="line"><span class="meta">$</span><span class="bash"> systemctl status nginx.service （查看服务当前状态）</span></span><br><span class="line"><span class="meta">$</span><span class="bash"> systemctl restart nginx.service　（重新启动服务）</span></span><br><span class="line"><span class="meta">$</span><span class="bash"> systemctl list-units --<span class="built_in">type</span>=service （查看所有已启动的服务）</span></span><br></pre></td></tr></table></figure>

<p><img src="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211027184353268.png" alt="image-20211027184353268"></p>
<h2 id="VPC"><a href="#VPC" class="headerlink" title="VPC"></a>VPC</h2><p>VPC 私有网络</p>
<h2 id="Docker"><a href="#Docker" class="headerlink" title="Docker"></a>Docker</h2><h3 id="Install-Docker"><a href="#Install-Docker" class="headerlink" title="Install Docker"></a>Install Docker</h3><p>pass …</p>
<h3 id="Start-Docker"><a href="#Start-Docker" class="headerlink" title="Start Docker"></a>Start Docker</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> sudo systemctl start docker</span></span><br></pre></td></tr></table></figure>

<h3 id="Docker-Start-On-LOGIN"><a href="#Docker-Start-On-LOGIN" class="headerlink" title="Docker Start On LOGIN"></a>Docker Start On LOGIN</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> systemctl <span class="built_in">enable</span> docker</span></span><br></pre></td></tr></table></figure>

<h3 id="Command-For-Docker"><a href="#Command-For-Docker" class="headerlink" title="Command For Docker"></a>Command For Docker</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> docker images                 <span class="comment"># 查看下载的镜像</span></span></span><br><span class="line"><span class="meta">$</span><span class="bash"> docker pull 镜像名:Tag(版本号)  <span class="comment"># 下载指定版本的镜像</span></span></span><br><span class="line"><span class="meta">$</span><span class="bash"> docker rm 容器名				<span class="comment"># 删除容器</span></span></span><br><span class="line"><span class="meta">$</span><span class="bash"> docker rmi 镜像名              <span class="comment"># 删除镜像</span></span></span><br><span class="line"><span class="meta">$</span><span class="bash"> docker run [设置项] 镜像名      <span class="comment"># 创建容器</span></span></span><br><span class="line"><span class="meta">$</span><span class="bash"> docker update 容器名 [设置项]   <span class="comment"># 更新配置</span></span></span><br><span class="line"><span class="meta">$</span><span class="bash"> docker stop 容器名             <span class="comment"># 停止容器</span></span></span><br><span class="line"></span><br><span class="line">docker设置项:</span><br><span class="line">-d 							  # 后台运行</span><br><span class="line">--name=xxxx					  # 容器名</span><br><span class="line">--restart=always     		  # 开机自启</span><br><span class="line">-p 主机端口:准映射端口           # 88:80比如访问88端口转到docker80</span><br></pre></td></tr></table></figure>

<h3 id="Docker-Install-Nginx"><a href="#Docker-Install-Nginx" class="headerlink" title="Docker Install Nginx"></a>Docker Install Nginx</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> docker pull nginx</span></span><br></pre></td></tr></table></figure>

<p>Then</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ docker run -d -p 70:80 --restart=always --name=nginx nginx</span><br></pre></td></tr></table></figure>

<h3 id="Come-Into-Container"><a href="#Come-Into-Container" class="headerlink" title="Come Into Container"></a>Come Into Container</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> docker <span class="built_in">exec</span> -it ContainerID /bin/bash</span></span><br></pre></td></tr></table></figure>

<p>If you have read something about Nginx in docker, you may know that HTML is in <code>/usr/share/nginx</code>,</p>
<p> You can use <code>echo</code> to  cover context. </p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> <span class="built_in">echo</span> <span class="string">&quot;Berlin is Here!&quot;</span> &gt; index.html</span></span><br></pre></td></tr></table></figure>

<p><img src="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211027214831585.png" alt="image-20211027214831585"></p>
<p>Here you go!  We succeed !  </p>
<p><img src="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211027215100845.png" alt="image-20211027215100845"></p>
<h3 id="Docker-Commit"><a href="#Docker-Commit" class="headerlink" title="Docker Commit"></a>Docker Commit</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> docker commit --<span class="built_in">help</span></span></span><br><span class="line"><span class="meta">	$</span><span class="bash"> docker commit -a <span class="string">&quot;Berlin&quot;</span> -m <span class="string">&quot;some Changed&quot;</span> ContainerID FileName:Tags</span></span><br><span class="line">Usage:  docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]</span><br><span class="line">Options:</span><br><span class="line">  -a, --author string    # 作者 Author (e.g., &quot;John Hannibal Smith &lt;hannibal@a-team.com&gt;&quot;)</span><br><span class="line">  -c, --change list      # Apply Dockerfile instruction to the created image</span><br><span class="line">  -m, --message string   # 提交信息 Commit message</span><br><span class="line">  -p, --pause            # Pause container during commit (default true)</span><br></pre></td></tr></table></figure>

<h3 id="Docker-Save"><a href="#Docker-Save" class="headerlink" title="Docker Save"></a>Docker Save</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> docker save --<span class="built_in">help</span></span></span><br><span class="line"><span class="meta">	$</span><span class="bash"> docker save -o FileName.tar ImageName:Tag</span></span><br><span class="line">Usage:  docker save [OPTIONS] IMAGE [IMAGE...]</span><br><span class="line"></span><br><span class="line">Save one or more images to a tar archive (streamed to STDOUT by default)</span><br><span class="line"><span class="meta">#</span><span class="bash"> 保存为.tar格式</span></span><br><span class="line">Options:</span><br><span class="line">  -o, --output string   Write to a file, instead of STDOUT</span><br></pre></td></tr></table></figure>

<h3 id="Docker-Load"><a href="#Docker-Load" class="headerlink" title="Docker Load"></a>Docker Load</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">$ docker load --<span class="built_in">help</span></span><br><span class="line">	$ docker load -i FileName.tar</span><br><span class="line">Usage:  docker load [OPTIONS]</span><br><span class="line">Load an image from a tar archive or STDIN</span><br><span class="line">Options:</span><br><span class="line">  -i, --input string   Read from tar archive file, instead of STDIN</span><br><span class="line">  -q, --quiet          Suppress the load output</span><br></pre></td></tr></table></figure>

<h3 id="Docker-Hub-Push"><a href="#Docker-Hub-Push" class="headerlink" title="Docker Hub Push"></a>Docker Hub Push</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> docker tag local-image:tagname new-repo:tagname</span></span><br><span class="line"><span class="meta">$</span><span class="bash"> docker push new-repo:tagname</span></span><br></pre></td></tr></table></figure>

<h3 id="Docker-Mount"><a href="#Docker-Mount" class="headerlink" title="Docker Mount"></a>Docker Mount</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> docker run -d -p 70:80 --restart=always --name=nginx -v /data/html:/usr/share/nginx/html:ro nginx</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> 将主机的/data/html 挂载到 /usr/share/nginx/html,会覆盖/usr/share/nginx/html中文件</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> :ro is Read-only</span> </span><br><span class="line"><span class="meta">#</span><span class="bash"> :rw is Read-Write</span></span><br></pre></td></tr></table></figure>

<h3 id="Docker-Logs"><a href="#Docker-Logs" class="headerlink" title="Docker Logs"></a>Docker Logs</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> docker logs ContainerID</span></span><br></pre></td></tr></table></figure>

<h3 id="Docker-cp"><a href="#Docker-cp" class="headerlink" title="Docker cp"></a>Docker cp</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> docker cp ContainerID:/etc/nginx/nginx.conf /data/conf/nginx.conf</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> 解释: 我们在挂载的时候可能会没有文件,这个时候可以从已经有的容器里拷贝</span> </span><br><span class="line"><span class="meta">#</span><span class="bash"> 比如上述: 将 ContainerId 容器下的 /etc/nginx/nginx.conf 拷贝到主机 /data/conf/nginx.conf 下</span></span><br></pre></td></tr></table></figure>



<h2 id="Redis"><a href="#Redis" class="headerlink" title="Redis"></a>Redis</h2><h3 id="Install-Redis"><a href="#Install-Redis" class="headerlink" title="Install Redis"></a>Install Redis</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> docker run -v /data/redis/redis.conf:/usr/<span class="built_in">local</span>/etc/redis/redis.conf \</span></span><br><span class="line"><span class="bash">-v /data/redis/data:/data \</span></span><br><span class="line"><span class="bash">--name myredis \</span></span><br><span class="line"><span class="bash">-d -p 6379:6379 \</span></span><br><span class="line"><span class="bash">redis redis-server /usr/<span class="built_in">local</span>/etc/redis/redis.conf</span></span><br></pre></td></tr></table></figure>

<p><img src="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211028005006115.png" alt="image-20211028005006115"></p>
<h3 id="Install-Plus-In-VsCode"><a href="#Install-Plus-In-VsCode" class="headerlink" title="Install Plus In VsCode"></a>Install Plus In VsCode</h3><p><a target="_blank" rel="noopener" href="https://marketplace.visualstudio.com/items?itemName=Dunn.redis">You can get plus by this Address</a></p>
<p><img src="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211028014028266.png" alt="image-20211028014028266"></p>
<p>填写完毕后点击<code>Test Connection</code>,右下角显示成功,OK!, 连接成功!</p>
<p><img src="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211028014116677.png" alt="image-20211028014116677"></p>
<h3 id="Redis-Password"><a href="#Redis-Password" class="headerlink" title="Redis Password"></a>Redis Password</h3><p><img src="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211028014313285.png" alt="image-20211028014313285"></p>
<p>在创建容器时我们把redis.conf挂载出来了,所以直接用vim编辑即可</p>
<p><img src="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211028014428144.png" alt="image-20211028014428144"></p>
<p>添加下述内容:</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">requirepass [password]</span><br></pre></td></tr></table></figure>

<p>保存,重启容器</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> docker restart myredis</span></span><br></pre></td></tr></table></figure>

<p>尝试连接(不填写密码情况下,出现:)</p>
<p><img src="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211028014654487.png" alt="image-20211028014654487"></p>
<p>正确姿势</p>
<p><img src="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211028014728873.png" alt="image-20211028014728873"></p>
<p>放心玩耍吧!</p>
<h2 id="Visitor-Count"><a href="#Visitor-Count" class="headerlink" title="Visitor Count"></a>Visitor Count</h2><p><em><strong>踩坑指南</strong></em></p>
<p><strong>pom文件的 spring-boot-maven-plugin报红</strong></p>
<p>报红是因为缺少版本号，后面加上即可<version>2.5.6</version></p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">build</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">plugins</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">plugin</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-maven-plugin<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.5.6<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">plugin</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">plugins</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">build</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>所加版本号需要和springboot的版本号一致。</p>
<p>结果</p>
<p><img src="https://gitee.com/berlinwong/picgo/raw/master/img/image-20211028025040556.png" alt="image-20211028025040556"></p>

      
    </div>
    
    
    
    
      <div style="text-align:center;color: #634db5;font-size:12px;">
-------------  本文结束 <i class="fa fa-cog fa-spin fa-1x fa-fw"></i> 感谢阅读  -------------
</div>

    
    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/berlinblog/tags/Java/" rel="tag"><i class="fa fa-tag"></i> Java</a>
          
            <a href="/berlinblog/tags/k8s/" rel="tag"><i class="fa fa-tag"></i> k8s</a>
          
            <a href="/berlinblog/tags/%E4%BA%91%E5%8E%9F%E7%94%9F/" rel="tag"><i class="fa fa-tag"></i> 云原生</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/berlinblog/2021/10/22/JavaWeb-P1-C1-IDEA-Java%E5%9F%BA%E7%A1%80/" rel="next" title="JavaWeb_P1_C1_IDEA-Java基础">
                <i class="fa fa-chevron-left"></i> JavaWeb_P1_C1_IDEA-Java基础
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            Table of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            Overview
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/berlinblog/images/avatar.png"
               alt="" />
          <p class="site-author-name" itemprop="name"></p>
           
              <p class="site-description motion-element" itemprop="description"></p>
          
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/berlinblog/archives/">
                <span class="site-state-item-count">17</span>
                <span class="site-state-item-name">posts</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-categories">
              <a href="/berlinblog/categories/index.html">
                <span class="site-state-item-count">4</span>
                <span class="site-state-item-name">categories</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/berlinblog/tags/index.html">
                <span class="site-state-item-count">17</span>
                <span class="site-state-item-name">tags</span>
              </a>
            </div>
          

        </nav>

        
          <div class="feed-link motion-element">
            <a href="/berlinblog/atom.xml" rel="alternate">
              <i class="fa fa-rss"></i>
              RSS
            </a>
          </div>
        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://gitee.com/berlinwong" target="_blank" title="Gitee">
                  
                    <i class="fa fa-fw fa-git"></i>
                  
                    
                      Gitee
                    
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="wzysws@gmail.com" target="_blank" title="E-Mail">
                  
                    <i class="fa fa-fw fa-envelope"></i>
                  
                    
                      E-Mail
                    
                </a>
              </span>
            
          
        </div>

        
        
          <div class="cc-license motion-element" itemprop="license">
            <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" class="cc-opacity" target="_blank">
              <img src="/berlinblog/images/cc-by-nc-sa.svg" alt="Creative Commons" />
            </a>
          </div>
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#Install-nginx"><span class="nav-number">1.</span> <span class="nav-text">Install nginx</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#Install"><span class="nav-number">1.1.</span> <span class="nav-text">Install</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Command-Start-amp-Stop"><span class="nav-number">1.2.</span> <span class="nav-text">Command Start &amp; Stop</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Tips-for-Chapter-one"><span class="nav-number">2.</span> <span class="nav-text">Tips for Chapter one</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#Edit-PATH"><span class="nav-number">2.1.</span> <span class="nav-text">Edit PATH</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Enable-Nginx-nginx-service"><span class="nav-number">2.2.</span> <span class="nav-text">Enable Nginx nginx.service</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Command-For-Nginx"><span class="nav-number">2.3.</span> <span class="nav-text">Command For Nginx</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#VPC"><span class="nav-number">3.</span> <span class="nav-text">VPC</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Docker"><span class="nav-number">4.</span> <span class="nav-text">Docker</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#Install-Docker"><span class="nav-number">4.1.</span> <span class="nav-text">Install Docker</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Start-Docker"><span class="nav-number">4.2.</span> <span class="nav-text">Start Docker</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Docker-Start-On-LOGIN"><span class="nav-number">4.3.</span> <span class="nav-text">Docker Start On LOGIN</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Command-For-Docker"><span class="nav-number">4.4.</span> <span class="nav-text">Command For Docker</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Docker-Install-Nginx"><span class="nav-number">4.5.</span> <span class="nav-text">Docker Install Nginx</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Come-Into-Container"><span class="nav-number">4.6.</span> <span class="nav-text">Come Into Container</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Docker-Commit"><span class="nav-number">4.7.</span> <span class="nav-text">Docker Commit</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Docker-Save"><span class="nav-number">4.8.</span> <span class="nav-text">Docker Save</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Docker-Load"><span class="nav-number">4.9.</span> <span class="nav-text">Docker Load</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Docker-Hub-Push"><span class="nav-number">4.10.</span> <span class="nav-text">Docker Hub Push</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Docker-Mount"><span class="nav-number">4.11.</span> <span class="nav-text">Docker Mount</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Docker-Logs"><span class="nav-number">4.12.</span> <span class="nav-text">Docker Logs</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Docker-cp"><span class="nav-number">4.13.</span> <span class="nav-text">Docker cp</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Redis"><span class="nav-number">5.</span> <span class="nav-text">Redis</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#Install-Redis"><span class="nav-number">5.1.</span> <span class="nav-text">Install Redis</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Install-Plus-In-VsCode"><span class="nav-number">5.2.</span> <span class="nav-text">Install Plus In VsCode</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Redis-Password"><span class="nav-number">5.3.</span> <span class="nav-text">Redis Password</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Visitor-Count"><span class="nav-number">6.</span> <span class="nav-text">Visitor Count</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      
        <div class="back-to-top">
          <i class="fa fa-arrow-up"></i>
          
            <span id="scrollpercent"><span>0</span>%</span>
          
        </div>
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-ravelry"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Berlin</span>
</div>



        

        
      </div>
    </footer>

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  <script type="text/javascript" src="/berlinblog/libs/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/berlinblog/libs/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/berlinblog/libs/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/berlinblog/libs/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/berlinblog/libs/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/berlinblog/libs/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/berlinblog/js/src/utils.js?v=5.1.2"></script>

  <script type="text/javascript" src="/berlinblog/js/src/motion.js?v=5.1.2"></script>



  
  


  <script type="text/javascript" src="/berlinblog/js/src/affix.js?v=5.1.2"></script>

  <script type="text/javascript" src="/berlinblog/js/src/schemes/pisces.js?v=5.1.2"></script>



  
  <script type="text/javascript" src="/berlinblog/js/src/scrollspy.js?v=5.1.2"></script>
<script type="text/javascript" src="/berlinblog/js/src/post-details.js?v=5.1.2"></script>



  


  <script type="text/javascript" src="/berlinblog/js/src/bootstrap.js?v=5.1.2"></script>



  


  




	





  





  






  





  

  
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>


  

  

  

  

</body>
</html>
